Skip to content

chore: update cover docs#1399

Merged
MilGard91 merged 3 commits intorelease-candidatefrom
chore/update-cover-docs
Apr 3, 2026
Merged

chore: update cover docs#1399
MilGard91 merged 3 commits intorelease-candidatefrom
chore/update-cover-docs

Conversation

@MilGard91
Copy link
Copy Markdown
Contributor

@MilGard91 MilGard91 commented Jun 25, 2025

Description

Describe the changes made in this PR. A link to the issue is enough if it contains all the relevant information.

Testing

Explain how you tested your changes to ensure they work as expected.

Checklist

  • Performed a self-review of my own code
  • Made corresponding changes to the documentation

Summary by CodeRabbit

Release Notes

  • New Features

    • Added new functions for querying cover allocations and tracking cover references
  • API Updates

    • Core cover data retrieval function renamed for improved clarity
    • Restructured buy cover parameters with simplified field structure
    • Clarified cover purchase and expiration operation descriptions
    • Removed legacy cover segment query functions

duxxud
duxxud previously approved these changes Jun 25, 2025
@shark0der shark0der changed the base branch from release-candidate to breaking/v3 August 18, 2025 17:20
@shark0der shark0der force-pushed the chore/update-cover-docs branch from 33d8749 to f3e0261 Compare August 18, 2025 17:21
@shark0der shark0der marked this pull request as draft August 18, 2025 17:21
@shark0der
Copy link
Copy Markdown
Contributor

I've corrected some structs in the document (sizes missing, wrong order of the parameters, etc). I think it needs another review to make sure I didn't miss other stuff. I've marked it as draft, let's get back to it after we sort out assessment/governance.

Base automatically changed from breaking/v3 to audit/governance-and-assessments-august-2025 September 4, 2025 11:28
@shark0der shark0der force-pushed the audit/governance-and-assessments-august-2025 branch from 64d1ffd to 5d445ff Compare September 4, 2025 12:29
Base automatically changed from audit/governance-and-assessments-august-2025 to release-candidate October 30, 2025 12:29
@MilGard91 MilGard91 force-pushed the chore/update-cover-docs branch from f3e0261 to db0843b Compare April 2, 2026 13:10
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ec8322c2-f6b9-4f0d-aa46-d27d3d6ded82

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Cover contract documentation was updated to reflect API and data structure changes: CoverData and BuyCoverParams types now use narrower integer widths, a new CoverReference struct was introduced, several view functions were renamed or added (getCoverData, getPoolAllocations, getCoverReference, etc.), and CoverSegment-related APIs were removed.

Changes

Cohort / File(s) Summary
Cover Contract Documentation
docs/contracts/Cover.md
Updated struct definitions: CoverData field types narrowed (productIduint24, coverAssetuint8), amountPaidOut replaced with amount, rewardsRatio/capacityRatio fields added; PoolAllocation.poolId widened to uint40; BuyCoverParams field types updated and reordered; PoolAllocationRequest.skip field removed. Introduced new CoverReference struct. Function renames: coverData(...)getCoverData(...); removed CoverSegment-based view functions; added getPoolAllocations(), getCoverReference(), getCoverDataWithReference(), getLatestEditCoverData(). Documented new constant DEFAULT_MIN_PRICE_RATIO.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: update cover docs' is directly related to the main change—updating the Cover contract documentation with new struct signatures, field types, function names, and API endpoints.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-cover-docs
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/update-cover-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

@MilGard91 MilGard91 marked this pull request as ready for review April 2, 2026 13:18
@MilGard91
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/contracts/Cover.md (1)

243-249: ⚠️ Potential issue | 🟡 Minor

Section title should match function name

The heading is coverData (Line 243), but the documented function is getCoverData (Line 248). Rename the heading for consistency and easier lookup.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/contracts/Cover.md` around lines 243 - 249, The section heading
currently reads "coverData" but the Solidity function is named getCoverData;
rename the heading to "getCoverData" (preserving the same heading level and
formatting, e.g., "### getCoverData") so it matches the documented function
signature getCoverData(uint coverId) and update any local anchors or links in
the doc that reference the old heading.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/contracts/Cover.md`:
- Line 118: Docs for cover editing are inconsistent: decide whether buyCover
supports edits or always reverts with EditNotSupported and update all related
sections to match that behavior. Pick the intended behavior (support edits or
not), then update the text references in Cover.md for the buyCover description,
any examples, error list (remove/add EditNotSupported), and mention locations
that currently conflict (mentions near buyCover, EditNotSupported, and related
subsections) so all mentions consistently state the chosen behavior.
- Line 255: Update the documentation for getCoverData to reflect the renamed
field in the CoverData struct: replace references to amountPaidOut with amount
(e.g., update the sentence that mentions productId, coverAsset, and
amountPaidOut to list productId, coverAsset, and amount). Ensure the doc string
for getCoverData and any nearby mentions in docs/contracts/Cover.md reference
the current CoverData field name `amount` so it matches the code.

---

Outside diff comments:
In `@docs/contracts/Cover.md`:
- Around line 243-249: The section heading currently reads "coverData" but the
Solidity function is named getCoverData; rename the heading to "getCoverData"
(preserving the same heading level and formatting, e.g., "### getCoverData") so
it matches the documented function signature getCoverData(uint coverId) and
update any local anchors or links in the doc that reference the old heading.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6ba0f0bd-ac6b-44b3-a088-4afbac086fd0

📥 Commits

Reviewing files that changed from the base of the PR and between ad21204 and db0843b.

📒 Files selected for processing (1)
  • docs/contracts/Cover.md

@MilGard91 MilGard91 merged commit 5645f38 into release-candidate Apr 3, 2026
7 checks passed
@MilGard91 MilGard91 deleted the chore/update-cover-docs branch April 3, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants